<!-- <div class="flex-justify-between">
    <ul class="files_type">
        <li v-for="(item) in $store.state.selection.selectionDic[url]" :class="[{active: file.form.type == item.id}, {extra: item.extra == '1'}]" :key="item.id" @click="file.form.type=item.id,currentTabName=item.name">
            <span>{{item.name+'('+(file.list[item.id]?file.list[item.id].length:0)+')'}}</span>
        </li>
    </ul>
    <div class="flex-1">
        <el-upload :action="postImgUrl" :on-success="imgSuccess" :on-error="uploadError" :before-upload="beforeImgUpload" :data="file.form" :show-file-list="false" class="mb-4" name="file">
            <el-button size="small" type="primary" v-if="canEdit">点击上传{{currentTabName}}</el-button>
        </el-upload>

        <el-dialog title="预览" :visible.sync="file.preview.show" append-to-body :modal="true">
            <img width="100%" :src="file.preview.url" alt="">
            <el-image style="width: 100%; height: auto" :src="file.preview.url" :preview-src-list="[file.preview.url]"></el-image>
        </el-dialog>

        <el-table v-loading="uploadLoading" :data="file.list[file.form.type]" style="width: 100%" border stripe :row-style="{height:'45px'}" :cell-style="{padding:'0px'}">
            <el-table-column type="index" label="序号" width="60" align="center"></el-table-column>
            <el-table-column prop="name" label="文件名称" min-width="200" align="center"></el-table-column>
            <el-table-column prop="type" label="文件类型" min-width="200" align="center">
                <template slot-scope="scope">{{ formatType(scope.row.type)}}</template>
            </el-table-column>
            <el-table-column label="操作" align="center" min-width="150">
                <template slot-scope="scope">
                    <el-button @click="file.preview.url= getImgUrl +scope.row.url,file.preview.show=true" type="primary" v-if="scope.row.suffix==='png'||scope.row.suffix==='jpg'||scope.row.suffix==='jpeg'" size="mini">预览</el-button>
                    <el-button type="primary" size="mini" @click="filePreviewOrDownload(scope.row)" v-if="!(scope.row.suffix==='png'||scope.row.suffix==='jpg'||scope.row.suffix==='jpeg')">下载</el-button>
                    <el-button v-if="canEdit" @click="delFile(scope.$index)" type="danger" size="mini">删除</el-button>
                </template>
            </el-table-column>
        </el-table>
    </div>
</div> -->
<div class="p-d-flex">
  <ul class="files_type">
    <li *ngFor="let item of data" [class]="{ 'extra': item.extra == '1' ,'active':file.form.type==item.id}" (click)="file.form.type=item.id;currentTabName = item.name">
      <span>{{item.name+ '('+(file.list[item.id]?file.list[item.id].length:0)+')'}}</span>
    </li>
  </ul>
  <div style="flex: 1" style="margin: 16px 0;">
    <p-fileUpload name="myfile[]" url="./upload.php" [auto]="true" accept="image/*" [chooseIcon]="''" maxFileSize="1000000" [chooseLabel]="'上传'+currentTabName" mode="basic"></p-fileUpload></div>
</div>
